﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：AuthorizationException.cs
// 功能描述：TongTongMall
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Logging;

namespace TongTongMall.Authorization
{
    public class AuthorizationException : TongTongMallException, IHasLogSeverity
    {

        /// <summary>
        /// 权限不足错误.
        /// </summary>
        public int Code { get; set; }

        public LogSeverity Severity { get; set; } = LogSeverity.Warn;

        public AuthorizationException()
        {

        }

        public AuthorizationException(SerializationInfo serializationInfo, StreamingContext context)
            : base(serializationInfo, context)
        {

        }


        public AuthorizationException(int code, string message)
            : base(message)
        {
            Code = code;
        }

        public AuthorizationException(int code, string message, Exception innerException)
            : base(message, innerException)
        {

        }
    }
}
